#!/usr/bin/python3.8
# -*- coding: utf-8 -*-
# @Time    : 2021/3/5 16:00
# @Author  : zhaohexin
# @Email   : 1483643520@xxx.com
# @File    : schemas.py
# @Software: PyCharm
# @FileDescription：roles 模型校验

from typing import Optional
from pydantic import BaseModel

from common.BaseSchemas import BaseSchemas


class RolesBase(BaseSchemas):
    """
    角色通用校验
    """
    name: str
    level: int
    description: Optional[str] = None
    data_scope: Optional[str] = None


class RolesWeb(BaseModel):
    """
    后端返回前端数据校验
    """
    dataScope: Optional[str] = None
    id: int
    level: int
    name: str
    createTime: Optional[str] = None
    updateTime: Optional[str] = None
    createBy: Optional[str] = None
